package GUI.animations.objects;

import GUI.animations.Animation;
import common.Position;
import datastructure.board.elements.LaserEmitterBoardElement;

import java.awt.*;

public class Laser extends Animation {

    Position position;


    public Laser(LaserEmitterBoardElement laserEmitterBoardElement){
        position = laserEmitterBoardElement.getPositionInGrid();

        setBounds(position.getX(), position.getY(), 10,10);
    }

    @Override
    public void paint(Graphics g) {
        g.fillRect(0, 0, 20, 20);

        Graphics2D g2 = (Graphics2D) g;

        g2.translate(50, 50);

        //rotate 90 degrees
        g2.rotate(90.0 * Math.PI / 180.0);
        //double size
        g2.scale(2.0, 2.0);

        g.setColor(Color.red);
        g.fillRect(0, 0, 20, 20);
    }

    public void stopContinuousAnimation() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void startContinuousAnimation() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void forwardOneFrame() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void resetAnimation() {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
